<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<!DOCTYPE html>
<html>
<head>
    <title>菜单form</title>
    <%@include file="../common/include.jsp" %>
    <script type="text/javascript" src="${rc.contextPath}/js/admin/menuForm.js"></script>
</head>
<body>

<div class="layui-container">
    <div class="layui-card">
        <div class="layui-card-header"></div>
        <div class="layui-card-body">
            <form class="layui-form" action="" method="post">
                <input type="hidden" id="pid" name="pid" value="${pMenu.menuId}">
                <input type="hidden" id="menuId" name="menuId" value="${menu.menuId}">
                <div class="layui-form-item">
                    <label class="layui-form-label">上级菜单</label>
                    <div class="layui-input-block">
                        <input type="text" id="title" name="title" class="layui-input" value="${pMenu.name}" disabled>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"></label>
                    <div class="layui-input-block">
                        <input type="radio" name="type" value="0" title="目录" <c:if test="${ menu.type == 0}">checked</c:if> >
                        <input type="radio" name="type" value="1" title="菜单" <c:if test="${ menu.type == 1}">checked</c:if> >
                        <input type="radio" name="type" value="2" title="按钮" <c:if test="${ menu.type == 2}">checked</c:if> >
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">菜单名称</label>
                    <div class="layui-input-block">
                        <input type="text" id="name" name="name" class="layui-input" value="${ menu.name}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">链接地址</label>
                    <div class="layui-input-block">
                        <input type="text" id="url" name="url" class="layui-input" value="${menu.url}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">权限标识</label>
                    <div class="layui-input-block">
                        <input type="text" id="perms" name="perms" class="layui-input" value="${menu.perms}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">排序号</label>
                    <div class="layui-input-block">
                        <input type="text" id="orderNum" name="orderNum" class="layui-input" value="${menu.orderNum}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-filter="editMenu" lay-submit>提交</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
</body>
</html>
